body {
    /* background: #f2f2f2; */
    background: #282c34;
}

.frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    margin-top: -200px;
    margin-left: -200px;
    border-radius: 2px;
    box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background: #27ae60;
    color: #fff;
}

.ring {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 100px;
    left: 100px;
    /* background: #0003; */

    --ringBase: calc(var(--r) - 1);
    transform: scale(calc(1 - var(--ringBase) / 7))
        rotate(calc(var(--ringBase) * 5deg));
    animation: inOut 6s ease-in-out alternate infinite;

    .dot {
        position: absolute;
        width: 10px;
        height: 10px;
        top: 100px;
        left: 100px;
        background: #fff;
        border-radius: 50px;

        opacity: calc(1 - var(--ringBase) / 10);

        --dotBase: calc(var(--d) - 1);
        --deg: calc(var(--dotBase) * 30deg);
        transform: translate3d(0, -100px, 0) rotate(var(--deg));
        transform-origin: 0 100px;
    }
}

@keyframes inOut {
    0% {
        transform: scale(calc(1 - var(--ringBase) / 7))
            rotate(calc(var(--ringBase) * 5deg));
    }
    100% {
        transform: scale(calc(1 - var(--ringBase) / 22))
            rotate(calc(var(--ringBase) * 10deg + 360deg));
    }
}
